Previous: Configuration, Up: Getting Started


1.2 Parsed URLs

The library functions typically operate on parsed versions of URLs. These are actually vectors of the form:

     [type user password host port file target attributes full]

where

type
is the type of the URL scheme, e.g., http
user
is the username associated with it, or nil;
password
is the user password associated with it, or nil;
host
is the host name associated with it, or nil;
port
is the port number associated with it, or nil;
file
is the `file' part of it, or nil. This doesn't necessarily actually refer to a file;
target
is the target part, or nil;
attributes
is the attributes associated with it, or nil;
full
is t for a fully-specified URL, with a host part indicated by ‘//’ after the scheme part.

These attributes have accessors named url-part, where part is the name of one of the elements above, e.g., url-host. Similarly, there are setters of the form url-set-part.

There are functions for parsing and unparsing between the string and vector forms.

— Function: url-generic-parse-url url

Return a parsed version of the string url.

— Function: url-recreate-url url

Recreates a URL string from the parsed url.